package com.smzd.ccms.mappers;


import java.util.List;
import java.util.Map;

import com.smzd.ccms.domain.Article;
import com.smzd.core.mappers.IMapper;
import com.smzd.framework.utils.db.RPage;

public interface ArticleMapper extends IMapper<Article> {

	Article getFirstArticleByChannelId(int chId);

	List<Article> getArticlesByChId(RPage<Article> page);

	int getArticlesCountByChId(RPage<Article> page);

	List<Article> getArticlesByChPath(RPage<Article> page);

	int getArticlesCountByChPath(RPage<Article> page);

	List<Article> getArticlesByPChId(RPage<Article> page);

	int getArticlesCountByPChId(RPage<Article> page);

    List<Article> getArticlesWithLastComment(RPage<Article> page);

    int getArticlesCount(RPage<Article> page);

	Article getUserFirstArticleWithinChannel(Map<String, Object> params);

	List<Article> getUserArticlesWithinChannels(RPage<Article> page);

	int getUserArticlesCountWithinChannels(RPage<Article> page);

	void updateArticleStatusAndScope(Article article);
}